@extends('layouts.app')
@section('title', isset($breadcrumb_categorys) ? $breadcrumb_categorys->name : '帖子列表-广场')

@section('content')
    <!-- 广场Home -->
    <div class="squareHome">
        <div class="col-md-12  hidden-sm hidden-xs ">
            <div>
                @include('layouts._message')
            </div>

        </div>
        <div class="crumbs">
            <ol class="breadcrumb">
                <li> <span class="glyphicon glyphicon-home " aria-hidden="true"></span>   <a href="javascript:;">首页</a></li>
                <li><a href="{{ route('topics.index') }}">广场</a></li>
                <li >
                    <a href="{{ route('topics.index') }}">全部板块</a>
                </li>

                @if (isset($breadcrumb_categorys))
                <li >
                     <a href="#">{{ $breadcrumb_categorys->name}}</a>
                </li>
                @endif

            </ol>
        </div>

        <div class="mainCont fl">
            <div class="title">
                <ul class="nav nav-pills fl">
                    <li role="presentation" class="{{ active_class(( (!if_query('order', 'recent'))&&(!if_query('order', 'replyCount'))&&(!if_query('order', 'essence')) )) }}"><a href="{{ Request::url() }}?order=default" title="活跃">活跃</a></li>
                    <li role="presentation" class="{{ active_class(if_query('order', 'essence')) }}"><a href="{{ Request::url() }}?order=essence" title="精华">精华</a></li>
                    <li role="presentation" class="{{ active_class(if_query('order', 'recent')) }}"><a href="{{ Request::url() }}?order=recent" title="最新">最新</a></li>
                    <li role="presentation" class="{{ active_class(if_query('order', 'replyCount')) }}"><a href="{{ Request::url() }}?order=replyCount" title="零回复">零回复</a></li>
                </ul>
            </div>
            {{-- 话题列表 --}}
            @include('forum.forum_topics._topic_list', ['forum_topics' => $forum_topics])

            <div class="more">
                {{-- 分页 --}}
                {!! $forum_topics->render() !!}
                <a href="#" title="更多内容"></a>
            </div>
        </div>
        <div class="classify fr">
            @if (isset($forum_categorys))
              @include('forum.forum_topics._sidebar', ['forum_categorys' => $forum_categorys])
                @else
                @include('forum.forum_topics._sidebar')
            @endif
        </div>
    </div>
<br/>
@stop
@section('script')
    <script>

    </script>
@stop
